using System.Collections.ObjectModel;
using System.ComponentModel;

namespace Rio.Framework.Pages.Controls.Navigation
{
    public class GroupViewModel : INotifyPropertyChanged
    {
        private string text;
        private string name;
		private ObservableCollection<ButtonViewModel> buttons;
        private bool isEnabled;

        /// <summary>
        /// Initializes a new instance of the <see cref="GroupViewModel" /> class.
        /// </summary>
        public GroupViewModel()
        {
			buttons = new ObservableCollection<ButtonViewModel>();
		}

        /// <summary>
        /// Gets the buttons.
        /// </summary>
        /// <value>The buttons.</value>
        public ObservableCollection<ButtonViewModel> Buttons
        {
			get
			{
				return buttons;
			}
		}

        public event PropertyChangedEventHandler PropertyChanged;

        /// <summary>
        /// Called when [property changed].
        /// </summary>
        /// <param name="propertyName">Name of the property.</param>
        protected void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        /// <summary>
        /// Gets or sets Text.
        /// </summary>
        /// <value>The text.</value>
        public string Text
        {
            get
            {
                return this.text;
            }
            set
            {
                if (this.text != value)
                {
                    this.text = value;
					this.OnPropertyChanged("Text");
                }
            }
        }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                if (this.name != value)
                {
                    this.name = value;
                    this.OnPropertyChanged("Name");
                }
            }
        }

        /// <summary>
        /// Gets or sets the is enabled.
        /// </summary>
        /// <value>The is enabled.</value>
        public bool IsEnabled
        {
            get
            {
                return isEnabled;
            }
            set
            {
                isEnabled = value;
                this.OnPropertyChanged("IsEnabled");
            }
        }

    }
}
